{* 
//////
//    @version [ Masterton ]
//    @package hwdVideoShare
//    @copyright (C) 2007 - 2009 Highwood Design
//    @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
//////
//    hwdVideoShare Template System:::This template system uses the Smarty Template Engine. 
//    For full documentation, including syntax usage please refer to http://www.smarty.net 
//    or our website at http://www.hwdmediashare.co.uk   
//////
//    This file generates the display for the video player page.
//////
//    VARIABLES AVAILBLE IN THIS TEMPLATE FILE:                                        
//    -- TO BE ADDED
//////
*}

{include file='header.tpl'}

{if $print_nextprev}
<div style="float:right;padding: 0 0 5px 0; text-align: right;">{$videoplayer->editvideo} {$videoplayer->deletevideo} {$videoplayer->nextprev}</div>
{/if}
<div style="clear:both;"></div>

<div class="hwdmodule-h5">
  <h2>{$videoplayer->title}</h2> 
  <div class="standard"><div class="padding"><center>{$videoplayer->player}</center></div></div>
</div>

{if $print_uservideolist}
	{if $print_relatedlist and $print_categoryvideolist}
	  <div style="width:33%;float:left;padding:0 5px 0 0;" id="usersection">
	{elseif $print_relatedlist or $print_categoryvideolist}
	  <div style="width:50%;float:left;padding:0 5px 0 0;" id="usersection">
	{else}
	  <div> 
	{/if}
		<div class="hwdmodule-h2">
		  <h2>{$smarty.const._HWDVIDS_TITLE_MOREBYUSR} {$videoplayer->uploader}</h2>
		      <div class="list">
			<div class="box">
			  {foreach name=outer item=data from=$userlist}
			  {if $smarty.foreach.outer.index % 2-1 == 0}
			    <div style="width: 48%; float:right;">
			  {else}
			    <div style="width: 48%; float:left;">
			  {/if}
			  {include file="video_list_simple.tpl"}
			  </div>
			  {if $smarty.foreach.outer.last}
			     <div style="clear:both;"></div>
			  {elseif $smarty.foreach.outer.index % 2-1 == 0}
			     <div style="clear:both;"></div></div><div class="box">
			  {/if}
			  {/foreach}
			</div>
		      </div> 
		</div>
	  </div>
{/if}

{if $print_relatedlist}
	{if $print_uservideolist and $print_categoryvideolist}
	  <div style="width:33%;float:left;padding:0 5px 0 0;" id="relatedsection">
	{elseif $print_uservideolist or $print_categoryvideolist}
	  <div style="width:50%;float:left;padding:0 0 0 0;" id="relatedsection">
	{else}
	  <div> 
	{/if}
		<div class="hwdmodule-h3">
		  <h2>{$smarty.const._HWDVIDS_RELATED}</h2>
		      <div class="list">
			<div class="box">
			  {foreach name=outer item=data from=$listrelated}
			  {if $smarty.foreach.outer.index % 2-1 == 0}
			    <div style="width: 48%; float:right;">
			  {else}
			    <div style="width: 48%; float:left;">
			  {/if}
			  {include file="video_list_simple.tpl"}
			  </div>
			  {if $smarty.foreach.outer.last}
			     <div style="clear:both;"></div>
			  {elseif $smarty.foreach.outer.index % 2-1 == 0}
			     <div style="clear:both;"></div></div><div class="box">
			  {/if}
			  {/foreach}
			</div>
		      </div> 
		</div>
	  </div>
{/if}

{if $print_categoryvideolist}
	{if $print_uservideolist and $print_relatedlist}
	  <div style="width:33%;float:right;padding:0 0 0 0;" id="categorysection">
	{elseif $print_uservideolist or $print_relatedlist}
	  <div style="width:50%;float:left;padding:0 0 0 0;" id="categorysection">
	{else}
	  <div> 
	{/if}
		<div class="hwdmodule-h1">
		  <h2>Category Videos</h2>
		      <div class="list">
			<div class="box">
			  {foreach name=outer item=data from=$categoryvideolist}
			  {if $smarty.foreach.outer.index % 2-1 == 0}
			    <div style="width: 48%; float:right;">
			  {else}
			    <div style="width: 48%; float:left;">
			  {/if}
			  {include file="video_list_simple.tpl"}
			  </div>
			  {if $smarty.foreach.outer.last}
			     <div style="clear:both;"></div>
			  {elseif $smarty.foreach.outer.index % 2-1 == 0}
			     <div style="clear:both;"></div></div><div class="box">
			  {/if}
			  {/foreach}
			</div>
		      </div> 
		</div>
	  </div>
{/if}

<div style="clear:both;"></div>
    {if $print_ads}{if $advert3}<div class="hwdadcontainer"><div id="hwdadverts-nopadding">{$advert3}</div></div>{/if}{/if}
<div style="clear:both;"></div>

{if $print_comments}
  <div style="width:50%;float:left;padding:0 5px 0 0;" id="datasection"> 
{else}
  <div> 
{/if}

<div class="hwdmodule-h5">

	<div class="standard">
		<div class="padding">
			<div class="padding" style="float:right;">
				{$videoplayer->avatar}
			</div>
			{$videoplayer->ratingsystem}
			<div style="clear:both;"></div>
		</div>
	</div>

</div>

<div class="hwdmodule-h5">

	<div class="standard">
		<div class="padding">
			<div style="padding:5px;float:right;"/>
            			<div>{$videoplayer->switchquality}</div>
				<div>{$videoplayer->downloadoriginal}</div>
				<div>{$videoplayer->vieworiginal}</div>
				<div>{$videoplayer->downloadflv}</div>
				<div id="addremfav">{$videoplayer->favourties}</div>
				<div>{$videoplayer->reportmedia}</div>
				<div style="clear:right;"></div>
				<div id="ajaxresponse"></div>
				<div style="clear:right;"></div>
			</div>
			
			{if $print_videourl}
			<div>
			<h4>{$smarty.const._HWDVIDS_TITLE_PERMALINK}</h4>
			<form name="vlink"><input type="text" value="{$videoplayer->videourl}" width="90%" onclick="copyit('vlink.vlink')" name="vlink" /></form>
			</div>
			{/if}
			{if $print_embedcode}
			<div>
			<h4>{$smarty.const._HWDVIDS_INFO_VIDEMBEDCODE}</h4>
			<form name="elink"><input type="text" value="{$videoplayer->embedcode}" width="90%" onclick="copyit('elink.elink')" name="elink" /></form>
			</div>
			{/if}
			<div style="clear:both;"></div>
		</div>
	</div>
</div>

<div class="hwdmodule-h5">

	<div class="standard">
		<div class="padding">

			{if $print_description}<div style="width:100%;overflow:hidden;"><h4>{$smarty.const._HWDVIDS_DESC}</h4>{$videoplayer->description}</div>{/if}
			{if $print_tags}<div style="width:100%;overflow:hidden;"><h4>{$smarty.const._HWDVIDS_TAGS}</h4>{$videoplayer->tags}</div>{/if}
			<div style="width:100%;overflow:hidden;">{$videoplayer->category}</div>



			{$videoplayer->socialbmlinks}

			{if $print_addtogroup}{$videoplayer->addtogroup}<div id="add2groupresponse"></div>{/if}

			<!--{$videoplayer->views}-->
			<!--{$videoplayer->upload_date}-->

		</div>
	</div>
</div>

</div>

{if $print_comments}
<div style="width:50%;float:left;" id="commentssection"
<div class="hwdmodule-h1">
  <h2>{$smarty.const._HWDVIDS_TITLE_VIDCOMMS}</h2>
  <div class="standard"><div class="padding"><center>{$videoplayer->comments}</center></div></div>
</div>
</div>
{/if}

<div style="clear:both;"></div>



	{if $print_uservideolist and $print_relatedlist and $print_categoryvideolist}

{literal}
<script language='javascript' type='text/javascript'>
	var fullWidth = document.getElementById("hwdvids").offsetWidth;
	var userWidth = document.getElementById("usersection").offsetWidth;
	var relaWidth = document.getElementById("relatedsection").offsetWidth;
	var sideWidth = fullWidth - userWidth - relaWidth - 2;
	document.getElementById("categorysection").style.width = sideWidth + "px";
</script>
{/literal}

	{elseif $print_relatedlist and $print_categoryvideolist}
	
{literal}
<script language='javascript' type='text/javascript'>
	var fullWidth = document.getElementById("hwdvids").offsetWidth;
	var relaWidth = document.getElementById("relatedsection").offsetWidth;
	var sideWidth = fullWidth - userWidth - 1;
	document.getElementById("categorysection").style.width = sideWidth + "px";
</script>
{/literal}

	{elseif $print_uservideolist and $print_relatedlist}
	
{literal}
<script language='javascript' type='text/javascript'>
	var fullWidth = document.getElementById("hwdvids").offsetWidth;
	var userWidth = document.getElementById("usersection").offsetWidth;
	var sideWidth = fullWidth - userWidth - 1;
	document.getElementById("relatedsection").style.width = sideWidth + "px";
</script>
{/literal}

	{elseif $print_uservideolist and $print_categoryvideolist}
	
{literal}
<script language='javascript' type='text/javascript'>
	var fullWidth = document.getElementById("hwdvids").offsetWidth;
	var userWidth = document.getElementById("usersection").offsetWidth;
	var sideWidth = fullWidth - userWidth - 1;
	document.getElementById("categorysection").style.width = sideWidth + "px";
</script>
{/literal}

	{/if}
	
{literal}
<script language='javascript' type='text/javascript'>
	var fullWidth = document.getElementById("hwdvids").offsetWidth;
	var dataWidth = document.getElementById("datasection").offsetWidth;
	var commWidth = fullWidth - dataWidth - 1;
	document.getElementById("commentssection").style.width = commWidth + "px";
</script>
{/literal}	


{include file='footer.tpl'}
